<?php

namespace App\Http\Controllers\Api\V1\Resources;

use App\Models\BuyerNotice;
use Illuminate\Http\Resources\Json\JsonResource;

class GoldSeedResource extends JsonResource
{
    public function toArray($request)
    {
    	$resource = $this->resource;

        $data = [
        	'id' => $resource->id,
	        'title' => $resource->title,
	        'product_id' => $resource->product_id,
	        'gold_round_id' => $resource->gold_round_id,
	        'all_rounds' => $resource->all_rounds,
	        'init_price' => $resource->init_price,

	        'product' => new ProductResource($this->whenLoaded('product')),
        ];

        return $data;
    }
}
